package com.ruoyi.system.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.api.Ordet;
import com.ruoyi.system.service.TestService;
import com.ruoyi.system.vo.PayResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : handsome boy
 * @date : 2024-12-16 20:01
 * @description :
 **/
@RequestMapping("/pay")
@RestController
public class TestController {

    @Autowired
    Ordet orderService;

    @Autowired
    TestService testService;

    @GetMapping("payment")
    public R payment(String orderId) throws Exception {
        PayResult payResult = testService.payment(orderId);
        return R.ok(payResult);
    }
    @RequestMapping("/qqq")
    public R qqq(){
        System.out.println("qqqqq");
        orderService.notify(1,"1111111");
        return R.ok();
    }






}
